<!DOCTYPE html>
<!--suppress ALL-->
<!--关闭下划线-->
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>xhlMr - 练习</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <style type="text/css">
        /* Chart.js */

        @-webkit-keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        @keyframes chartjs-render-animation {
            from {
                opacity: 0.99
            }
            to {
                opacity: 1
            }
        }

        .chartjs-render-monitor {
            -webkit-animation: chartjs-render-animation 0.001s;
            animation: chartjs-render-animation 0.001s;
        }

        table {
            table-layout: fixed;
        }

        td {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    </style>
</head>

<body>

<!--		顶部导航栏-->
<div th:replace="~{commons/commons :: top}"></div>

<div class="container-fluid">
    <div class="row">
        <!--				侧边栏-->
        <div th:replace="~{commons/commons :: sidebar(active='hotnews')}"></div>
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div style="height: 65px;text-align: center;color: red;font-size: 16px;font-weight:bold">热点新闻</div>

            <div>
                <button type="button" class="btn btn-info"><a th:href="@{addnews}" style="text-decoration:none">添加新闻</a>
                </button>
                <input type="text" style="margin-left: 20px;border: 1.2px solid lawngreen" class="btn"/>
                <button type="button" class="btn btn-primary">搜索</button>
            </div>


            <div style="margin-top: 30px;height:35px;text-align:center;font-size: 16px;font-weight:bold">新闻热度排行榜</div>
            <table class="table">
                <thead>
                <tr>
                    <th>热度</th>
                    <th>标题</th>
                    <th>内容</th>
                    <th>上传时间</th>
                    <th>作者</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="hot:${hotnews}">
                    <td th:text="${hot.getHeat()}" style="color: red;font-weight:bold"></td>
                    <td><a th:href="@{news+'?cid='+${hot.getCid()}}" th:text="${hot.getTitile()}"></a></td>
                    <td><a th:href="@{news+'?cid='+${hot.getCid()}}" th:text="${hot.getCcontent()}"></a></td>
                    <td th:text="${#dates.format(hot.getCdate(),'yyyy-MM-dd HH-mm-ss')}"></td>
                    <td th:text="${hot.getCauthor()}"></td>
                    <td th:if="${hot.getUid()} == ${session.loginUid}">
                        <button type="button" class="btn btn-info"><a th:href="@{newsUpdate(cid=${hot.getCid()})}"
                                                                      style="text-decoration:none;color: white">修改</a>
                        </button>
                        <button type="button" class="btn btn-danger"><a th:href="@{newsDel(cid=${hot.getCid()})}"
                                                                        style="text-decoration:none;color: white">删除</a>
                        </button>
                    </td>
                </tr>
                </tbody>
            </table>
        </main>
    </div>
</div>


</body>

</html>